package com.biz.primus.ms.commodity.trans.searchRecommendword;

import com.biz.primus.commodity.vo.backend.searchRecommendWord.SearchRecommendWordVo;
import com.biz.primus.ms.commodity.dao.po.SearchRecommendWord;
import com.google.common.base.Function;

import java.text.DateFormat;
import java.text.SimpleDateFormat;

/**
 * Po --> Vo
 * @author huiwu.heng
 * @date 2017年2月9日
 */
public class SearchRecommendWord2SearchRecommendWordVo implements Function<SearchRecommendWord, SearchRecommendWordVo> {

	@Override
	public SearchRecommendWordVo apply(SearchRecommendWord searchRecommendWord) {
		SearchRecommendWordVo searchRecommendWordVo = new SearchRecommendWordVo();
		searchRecommendWordVo.setWordId(String.valueOf(searchRecommendWord.getId()));
		searchRecommendWordVo.setIdx(searchRecommendWord.getIdx());
		searchRecommendWordVo.setNote(searchRecommendWord.getNote());
		searchRecommendWordVo.setSearchName(searchRecommendWord.getSearchName());
		return searchRecommendWordVo;
	}

	private static final DateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
}
